// import 'package:amap_flutter/amap_flutter.dart' as amap ;
// import 'package:getx_scaffold/getx_scaffold.dart';
// import 'package:latlong2/latlong.dart' show LatLng;
//
// class PositionAmapFlutterView extends StatefulWidget {
//   const PositionAmapFlutterView({super.key});
//
//   @override
//   State<PositionAmapFlutterView> createState() => _PositionAmapFlutterViewState();
// }
//
// class _PositionAmapFlutterViewState extends State<PositionAmapFlutterView> {
//   late amap.AMapController controller;
//
//   @override
//   void initState() {
//     super.initState();
//     amap.AMapFlutter.init(
//       apiKey: amap.ApiKey(
//         iosKey: "a4a1394fe817c2f86a424b897b4a9af4",
//         androidKey: "7c52e86a2ada5bb47343357e5d94025d",
//         webKey: "fc9908dc4103f3d8274070bb34ab37af",
//       ),
//       agreePrivacy: true,
//     );
//     requestLocationPermission();
//   }
//
//   Future<void> requestLocationPermission() async {
//     var status = await Permission.location.status;
//     if (status != PermissionStatus.granted) {
//       await Permission.location.request();
//     }
//   }
//   @override
//   Widget build(BuildContext context) {
//     return amap.AMapFlutter(
//       initCameraPosition: amap.CameraPosition(
//         position:  const LatLng(39.984120, 116.307484),
//         zoom: 17.2,
//       ),
//       onMapCreated: (controller) {
//         this.controller = controller;
//         final marker = amap.Marker(
//           id: 'markerId',
//           position: const LatLng(39.984120, 116.307484),
//         );
//         controller.addMarker(marker);
//       },
//     );
//   }
// }
